import 'package:flutter_study_app/app/router/i_router.dart';
import 'package:flutter_study_app/app/router/page_builder.dart';
import 'package:flutter_study_app/app/router/routers.dart';
import 'package:flutter_study_app/module/online_lend/page/online_lend_search_page.dart';

class OnlineLendRouter extends IRouter {
  @override
  List<PageBuilder> createPageBuilders() {
    return [
      PageBuilder(Routers.onlineLendSearchPage, (params) {
        int type = params?.getInt("type") ?? 0;
        String? name = params?.getString("name");
        String? searchType = params?.getString("search_type");
        return OnlineLendSearchPage(
          type: type,
          searchName: name,
          searchType: searchType,
        );
      }),
    ];
  }
}
